package com.awesome.ipcdemo.contentprovider;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Author: zhangjingfang
 * Email:zhangjingfang@jeejio.com
 * Date: 2021/8/8 11:51 下午
 * Description:类描述
 */
public class DbOpenHelper extends SQLiteOpenHelper {
    private static final String DB_NAME = "game_provider.db";
    public static final String GAME_TABLE_NAME = "game";
    private static final int DB_VERSION = 1;
    private static final String CREATE_GAME_TABLE = "create table if not exists " + GAME_TABLE_NAME +
            "(_id integer primary key," + "name TEXT," + "describe TEXT)";

    public DbOpenHelper(Context context) {
        super(context, DB_NAME, null, DB_VERSION);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_GAME_TABLE);

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}